package bigbook;

import java.io.FileInputStream;

public class Main{
    public static void main(String[] args) throws Exception {
        FileInputStream fileInputStream = new FileInputStream("src/bigbook/bigbook.txt");
        int tmp = fileInputStream.read();
        int count = 0;

        while(tmp != -1){
            if((char)tmp == 'A' || (char)tmp == 'a'){
                count++;
            }
            tmp = fileInputStream.read();
        }

        System.out.println("文件中有：" + count + "个A或a.");
        fileInputStream.close();
    }
}
